package com.pdg.mcplugin.invisiblehand.commandprocessors;

import org.bukkit.command.CommandSender;
import com.pdg.mcplugin.common.ArgumentList;
import com.pdg.mcplugin.common.baseclasses.CommandProcessorBase;
import com.pdg.mcplugin.invisiblehand.InvisibleHand;

public class CommandProcessor extends CommandProcessorBase<InvisibleHand>{

	private static final String subcommandSell = "SELL";
	private static final String subcommandBuy = "BUY";
	private static final String subcommandPrice = "PRICE";
	private static final String subcommandPrices = "PRICES";
	private static final String subcommandSet = "SET";
	private static final String subcommandGet = "GET";
	private static final String subcommandCreate = "CREATE";
	private static final String subcommandAudit = "AUDIT";
	private static final String subcommandRemove = "REMOVE";
	private static final String subcommandConfig = "CONFIG";
	private static final String subcommandAdmin = "ADMIN";
	private static final String subcommandTally = "TALLY";
	
	public CommandProcessor(InvisibleHand thePlugin) {
		super(thePlugin,new String[]{
			"/ih          - general help(you are here)",
			"/ih sell     - help with the sell command",
			"/ih buy      - help with the buy command",
			"/ih price    - help with the price command",
			"/ih prices   - help with the prices command",
			"/ih set      - help with the set command",
			"/ih get      - help with the get command",
			"/ih create   - help with the create command",
			"/ih audit    - help with the audit command",
			"/ih remove   - help with the remove command",
			"/ih config   - help with the config command",
			"/ih admin    - help with the admin command",
			"/ih tally    - help with the tally command"
		});
		setSubProcessor(subcommandSell,new SellCommandProcessor(thePlugin));
		setSubProcessor(subcommandBuy,new BuyCommandProcessor(thePlugin));
		setSubProcessor(subcommandPrice,new PriceCommandProcessor(thePlugin));
		setSubProcessor(subcommandPrices,new PricesCommandProcessor(thePlugin));
		setSubProcessor(subcommandSet,new SetCommandProcessor(thePlugin));
		setSubProcessor(subcommandGet,new GetCommandProcessor(thePlugin));
		setSubProcessor(subcommandCreate,new CreateCommandProcessor(thePlugin));
		setSubProcessor(subcommandAudit,new AuditCommandProcessor(thePlugin));
		setSubProcessor(subcommandRemove,new RemoveCommandProcessor(thePlugin));
		setSubProcessor(subcommandConfig,new ConfigCommandProcessor(thePlugin));
		setSubProcessor(subcommandAdmin,new AdminCommandProcessor(thePlugin));
		setSubProcessor(subcommandTally,new TallyCommandProcessor(thePlugin));
	}

	@Override
	protected boolean specialProcessCommand(CommandSender theCommandSender,
			String theSubCommand, ArgumentList theArgumentList) {
		return false;
	}
}
